From 118199d5790601e29c1dc21c98e9957ac28661d9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 May 1993 23:32:41 +0000 Subject: [PATCH] (Info-mode-map): Correct Info-top to Info-top-node. --- lisp/info.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 98796504234..2a929c95d40 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -47,7 +47,18 @@ The Lisp code is executed when the node is selected.") This value is used as the default for `Info-directory-list'. It is set in paths.el.") -(defvar Info-directory-list nil +(defvar Info-directory-list + (let ((path (getenv "INFOPATH"))) + (if path + (let ((list nil) + idx) + (while (> (length path) 0) + (setq idx (or (string-match ":" path) (length path)) + list (cons (substring path 0 idx) list) + path (substring path (min (1+ idx) + (length path))))) + (nreverse list)) + Info-default-directory-list)) "List of directories to search for Info documentation files. nil means not yet initialized. In this case, Info uses the environment variable INFOPATH to initialize it, or `Info-default-directory-list' @@ -112,19 +123,6 @@ In interactive use, a prefix argument directs this command to read a file name from the minibuffer." (interactive (if current-prefix-arg (list (read-file-name "Info file name: " nil nil t)))) - (or Info-directory-list - (setq Info-directory-list - (let ((path (getenv "INFOPATH"))) - (if path - (let ((list nil) - idx) - (while (> (length path) 0) - (setq idx (or (string-match ":" path) (length path)) - list (cons (substring path 0 idx) list) - path (substring path (min (1+ idx) - (length path))))) - (nreverse list)) - Info-default-directory-list)))) (if file (Info-goto-node (concat "(" file ")")) (if (get-buffer "*info*") -- 2.30.2